﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Framework;
using Com.Framework.Data;
using Com.Library.DB.Contribute;
using Com.Library.Page;

namespace Com.Web.coffinegurunaru.manager.banner
{
	public partial class ContributeMethod : ManagerAjaxPage
	{
		public void Create(string TitleImageURL, string ImageURL, string LinkURL)
		{
			ContributeModel.Create(TitleImageURL, ImageURL, LinkURL);
		}

		public void Remove(int IndexNo)
		{
			ContributeModel.Remove(IndexNo);
		}

		public string GetList(int PageNo, byte PageSize)
		{
			ListData<ContributeEntity, OutputEntity> data = ContributeModel.GetList(PageNo, PageSize);
			Dictionary<string, object> properties = new Dictionary<string, object>();
			properties.Add("ContributeList", data.Record);
			string retValue = ViewManager<ManagerPage>.Render("/manager/banner/contributelist.ascx", properties);
			return retValue;
		}
	}
}
